.class public Lcom/inmobi/androidsdk/bootstrapper/ConfigParams;
.super Ljava/lang/Object;
.source "ConfigParams.java"


# instance fields
.field a:I

.field b:I

.field c:I

.field d:I

.field e:Ljava/lang/String;

.field f:Lcom/inmobi/androidsdk/bootstrapper/IMAIConfigParams;

.field g:Lcom/inmobi/androidsdk/bootstrapper/MetricConfigParams;

.field h:Lcom/inmobi/commons/uid/UID;

.field i:Lcom/inmobi/androidsdk/bootstrapper/AppGalleryConfigParams;


# direct methods
.method public constructor <init>()V
    .locals 1

    .prologue
    .line 81
    const/4 v0, 0x0

    invoke-direct {p0, v0}, Lcom/inmobi/androidsdk/bootstrapper/ConfigParams;-><init>(Lorg/json/JSONObject;)V

    .line 82
    return-void
.end method

.method public constructor <init>(Lorg/json/JSONObject;)V
    .locals 2
    .parameter

    .prologue
    const/16 v1, 0x3c

    .line 84
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 27
    const/16 v0, 0x14

    iput v0, p0, Lcom/inmobi/androidsdk/bootstrapper/ConfigParams;->a:I

    iput v1, p0, Lcom/inmobi/androidsdk/bootstrapper/ConfigParams;->b:I

    iput v1, p0, Lcom/inmobi/androidsdk/bootstrapper/ConfigParams;->c:I

    iput v1, p0, Lcom/inmobi/androidsdk/bootstrapper/ConfigParams;->d:I

    .line 31
    const-string v0, "#00000000"

    iput-object v0, p0, Lcom/inmobi/androidsdk/bootstrapper/ConfigParams;->e:Ljava/lang/String;

    .line 33
    new-instance v0, Lcom/inmobi/androidsdk/bootstrapper/IMAIConfigParams;

    invoke-direct {v0}, Lcom/inmobi/androidsdk/bootstrapper/IMAIConfigParams;-><init>()V

    iput-object v0, p0, Lcom/inmobi/androidsdk/bootstrapper/ConfigParams;->f:Lcom/inmobi/androidsdk/bootstrapper/IMAIConfigParams;

    .line 34
    new-instance v0, Lcom/inmobi/androidsdk/bootstrapper/MetricConfigParams;

    invoke-direct {v0}, Lcom/inmobi/androidsdk/bootstrapper/MetricConfigParams;-><init>()V

    iput-object v0, p0, Lcom/inmobi/androidsdk/bootstrapper/ConfigParams;->g:Lcom/inmobi/androidsdk/bootstrapper/MetricConfigParams;

    .line 35
    new-instance v0, Lcom/inmobi/commons/uid/UID;

    invoke-direct {v0}, Lcom/inmobi/commons/uid/UID;-><init>()V

    iput-object v0, p0, Lcom/inmobi/androidsdk/bootstrapper/ConfigParams;->h:Lcom/inmobi/commons/uid/UID;

    .line 36
    new-instance v0, Lcom/inmobi/androidsdk/bootstrapper/AppGalleryConfigParams;

    invoke-direct {v0}, Lcom/inmobi/androidsdk/bootstrapper/AppGalleryConfigParams;-><init>()V

    iput-object v0, p0, Lcom/inmobi/androidsdk/bootstrapper/ConfigParams;->i:Lcom/inmobi/androidsdk/bootstrapper/AppGalleryConfigParams;

    .line 85
    if-eqz p1, :cond_0

    .line 86
    invoke-virtual {p0, p1}, Lcom/inmobi/androidsdk/bootstrapper/ConfigParams;->setFromJSON(Lorg/json/JSONObject;)V

    .line 89
    :goto_0
    return-void

    .line 88
    :cond_0
    new-instance v0, Lorg/json/JSONObject;

    invoke-direct {v0}, Lorg/json/JSONObject;-><init>()V

    invoke-virtual {p0, v0}, Lcom/inmobi/androidsdk/bootstrapper/ConfigParams;->setFromJSON(Lorg/json/JSONObject;)V

    goto :goto_0
.end method


# virtual methods
.method public getAppAppGalleryConfigParams()Lcom/inmobi/androidsdk/bootstrapper/AppGalleryConfigParams;
    .locals 1

    .prologue
    .line 77
    iget-object v0, p0, Lcom/inmobi/androidsdk/bootstrapper/ConfigParams;->i:Lcom/inmobi/androidsdk/bootstrapper/AppGalleryConfigParams;

    return-object v0
.end method

.method public getDefaultRefreshRate()I
    .locals 1

    .prologue
    .line 43
    iget v0, p0, Lcom/inmobi/androidsdk/bootstrapper/ConfigParams;->b:I

    return v0
.end method

.method public getFetchTimeOut()I
    .locals 1

    .prologue
    .line 50
    iget v0, p0, Lcom/inmobi/androidsdk/bootstrapper/ConfigParams;->c:I

    mul-int/lit16 v0, v0, 0x3e8

    return v0
.end method

.method public getImai()Lcom/inmobi/androidsdk/bootstrapper/IMAIConfigParams;
    .locals 1

    .prologue
    .line 65
    iget-object v0, p0, Lcom/inmobi/androidsdk/bootstrapper/ConfigParams;->f:Lcom/inmobi/androidsdk/bootstrapper/IMAIConfigParams;

    return-object v0
.end method

.method public getMetric()Lcom/inmobi/androidsdk/bootstrapper/MetricConfigParams;
    .locals 1

    .prologue
    .line 69
    iget-object v0, p0, Lcom/inmobi/androidsdk/bootstrapper/ConfigParams;->g:Lcom/inmobi/androidsdk/bootstrapper/MetricConfigParams;

    return-object v0
.end method

.method public getMinimumRefreshRate()I
    .locals 1

    .prologue
    .line 39
    iget v0, p0, Lcom/inmobi/androidsdk/bootstrapper/ConfigParams;->a:I

    return v0
.end method

.method public getRenderTimeOut()I
    .locals 1

    .prologue
    .line 57
    iget v0, p0, Lcom/inmobi/androidsdk/bootstrapper/ConfigParams;->d:I

    mul-int/lit16 v0, v0, 0x3e8

    return v0
.end method

.method public getUID()Lcom/inmobi/commons/uid/UID;
    .locals 1

    .prologue
    .line 73
    iget-object v0, p0, Lcom/inmobi/androidsdk/bootstrapper/ConfigParams;->h:Lcom/inmobi/commons/uid/UID;

    return-object v0
.end method

.method public getWebviewBgColor()Ljava/lang/String;
    .locals 1

    .prologue
    .line 61
    iget-object v0, p0, Lcom/inmobi/androidsdk/bootstrapper/ConfigParams;->e:Ljava/lang/String;

    return-object v0
.end method

.method public setFromJSON(Lorg/json/JSONObject;)V
    .locals 4
    .parameter

    .prologue
    const v3, 0x7fffffff

    const/4 v2, 0x1

    .line 92
    if-nez p1, :cond_0

    .line 132
    :goto_0
    return-void

    .line 94
    :cond_0
    const-string v0, "mrr"

    iget v1, p0, Lcom/inmobi/androidsdk/bootstrapper/ConfigParams;->a:I

    invoke-static {p1, v0, v1, v2, v3}, Lcom/inmobi/commons/internal/InternalSDKUtil;->getIntFromJSON(Lorg/json/JSONObject;Ljava/lang/String;III)I

    move-result v0

    iput v0, p0, Lcom/inmobi/androidsdk/bootstrapper/ConfigParams;->a:I

    .line 96
    const-string v0, "drr"

    iget v1, p0, Lcom/inmobi/androidsdk/bootstrapper/ConfigParams;->b:I

    invoke-static {p1, v0, v1, v2, v3}, Lcom/inmobi/commons/internal/InternalSDKUtil;->getIntFromJSON(Lorg/json/JSONObject;Ljava/lang/String;III)I

    move-result v0

    iput v0, p0, Lcom/inmobi/androidsdk/bootstrapper/ConfigParams;->b:I

    .line 99
    const-string v0, "fto"

    iget v1, p0, Lcom/inmobi/androidsdk/bootstrapper/ConfigParams;->c:I

    invoke-static {p1, v0, v1, v2, v3}, Lcom/inmobi/commons/internal/InternalSDKUtil;->getIntFromJSON(Lorg/json/JSONObject;Ljava/lang/String;III)I

    move-result v0

    iput v0, p0, Lcom/inmobi/androidsdk/bootstrapper/ConfigParams;->c:I

    .line 101
    const-string v0, "rto"

    iget v1, p0, Lcom/inmobi/androidsdk/bootstrapper/ConfigParams;->d:I

    invoke-static {p1, v0, v1, v2, v3}, Lcom/inmobi/commons/internal/InternalSDKUtil;->getIntFromJSON(Lorg/json/JSONObject;Ljava/lang/String;III)I

    move-result v0

    iput v0, p0, Lcom/inmobi/androidsdk/bootstrapper/ConfigParams;->d:I

    .line 103
    const-string v0, "wthc"

    iget-object v1, p0, Lcom/inmobi/androidsdk/bootstrapper/ConfigParams;->e:Ljava/lang/String;

    invoke-static {p1, v0, v1}, Lcom/inmobi/commons/internal/InternalSDKUtil;->getStringFromJSON(Lorg/json/JSONObject;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/inmobi/androidsdk/bootstrapper/ConfigParams;->e:Ljava/lang/String;

    .line 107
    :try_start_0
    const-string v0, "imai"

    invoke-virtual {p1, v0}, Lorg/json/JSONObject;->getJSONObject(Ljava/lang/String;)Lorg/json/JSONObject;

    move-result-object v0

    .line 108
    iget-object v1, p0, Lcom/inmobi/androidsdk/bootstrapper/ConfigParams;->f:Lcom/inmobi/androidsdk/bootstrapper/IMAIConfigParams;

    invoke-virtual {v1, v0}, Lcom/inmobi/androidsdk/bootstrapper/IMAIConfigParams;->setFromJSON(Lorg/json/JSONObject;)V
    :try_end_0
    .catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_1

    .line 113
    :goto_1
    :try_start_1
    const-string v0, "metric"

    invoke-virtual {p1, v0}, Lorg/json/JSONObject;->getJSONObject(Ljava/lang/String;)Lorg/json/JSONObject;

    move-result-object v0

    .line 114
    iget-object v1, p0, Lcom/inmobi/androidsdk/bootstrapper/ConfigParams;->g:Lcom/inmobi/androidsdk/bootstrapper/MetricConfigParams;

    invoke-virtual {v1, v0}, Lcom/inmobi/androidsdk/bootstrapper/MetricConfigParams;->setFromJSON(Lorg/json/JSONObject;)V
    :try_end_1
    .catch Lorg/json/JSONException; {:try_start_1 .. :try_end_1} :catch_2

    .line 120
    :goto_2
    :try_start_2
    const-string v0, "ag"

    invoke-virtual {p1, v0}, Lorg/json/JSONObject;->getJSONObject(Ljava/lang/String;)Lorg/json/JSONObject;

    move-result-object v0

    .line 121
    iget-object v1, p0, Lcom/inmobi/androidsdk/bootstrapper/ConfigParams;->i:Lcom/inmobi/androidsdk/bootstrapper/AppGalleryConfigParams;

    invoke-virtual {v1, v0}, Lcom/inmobi/androidsdk/bootstrapper/AppGalleryConfigParams;->setFromJSON(Lorg/json/JSONObject;)V
    :try_end_2
    .catch Lorg/json/JSONException; {:try_start_2 .. :try_end_2} :catch_3

    .line 127
    :goto_3
    :try_start_3
    const-string v0, "ids"

    invoke-virtual {p1, v0}, Lorg/json/JSONObject;->getJSONObject(Ljava/lang/String;)Lorg/json/JSONObject;

    move-result-object v0

    .line 128
    iget-object v1, p0, Lcom/inmobi/androidsdk/bootstrapper/ConfigParams;->h:Lcom/inmobi/commons/uid/UID;

    invoke-virtual {v1, v0}, Lcom/inmobi/commons/uid/UID;->setFromJSON(Lorg/json/JSONObject;)V
    :try_end_3
    .catch Lorg/json/JSONException; {:try_start_3 .. :try_end_3} :catch_0

    goto :goto_0

    .line 129
    :catch_0
    move-exception v0

    .line 130
    const-string v0, "InMobiAndroidSDK_3.7.0"

    const-string v1, "Unable to read UID configs"

    invoke-static {v0, v1}, Lcom/inmobi/commons/internal/Log;->debug(Ljava/lang/String;Ljava/lang/String;)V

    goto :goto_0

    .line 109
    :catch_1
    move-exception v0

    .line 110
    const-string v0, "InMobiAndroidSDK_3.7.0"

    const-string v1, "Unable to read IMAI configs"

    invoke-static {v0, v1}, Lcom/inmobi/commons/internal/Log;->debug(Ljava/lang/String;Ljava/lang/String;)V

    goto :goto_1

    .line 115
    :catch_2
    move-exception v0

    .line 116
    const-string v0, "InMobiAndroidSDK_3.7.0"

    const-string v1, "Unable to read metrics configs"

    invoke-static {v0, v1}, Lcom/inmobi/commons/internal/Log;->debug(Ljava/lang/String;Ljava/lang/String;)V

    goto :goto_2

    .line 122
    :catch_3
    move-exception v0

    .line 123
    const-string v0, "InMobiAndroidSDK_3.7.0"

    const-string v1, "Unable to read app gallery configs"

    invoke-static {v0, v1}, Lcom/inmobi/commons/internal/Log;->debug(Ljava/lang/String;Ljava/lang/String;)V

    goto :goto_3
.end method

.method public toJSON()Lorg/json/JSONObject;
    .locals 3
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lorg/json/JSONException;
        }
    .end annotation

    .prologue
    .line 135
    new-instance v0, Lorg/json/JSONObject;

    invoke-direct {v0}, Lorg/json/JSONObject;-><init>()V

    .line 136
    const-string v1, "mrr"

    iget v2, p0, Lcom/inmobi/androidsdk/bootstrapper/ConfigParams;->a:I

    invoke-virtual {v0, v1, v2}, Lorg/json/JSONObject;->put(Ljava/lang/String;I)Lorg/json/JSONObject;

    .line 137
    const-string v1, "fto"

    iget v2, p0, Lcom/inmobi/androidsdk/bootstrapper/ConfigParams;->c:I

    invoke-virtual {v0, v1, v2}, Lorg/json/JSONObject;->put(Ljava/lang/String;I)Lorg/json/JSONObject;

    .line 138
    const-string v1, "drr"

    iget v2, p0, Lcom/inmobi/androidsdk/bootstrapper/ConfigParams;->b:I

    invoke-virtual {v0, v1, v2}, Lorg/json/JSONObject;->put(Ljava/lang/String;I)Lorg/json/JSONObject;

    .line 139
    const-string v1, "rto"

    iget v2, p0, Lcom/inmobi/androidsdk/bootstrapper/ConfigParams;->d:I

    invoke-virtual {v0, v1, v2}, Lorg/json/JSONObject;->put(Ljava/lang/String;I)Lorg/json/JSONObject;

    .line 140
    const-string v1, "wthc"

    iget-object v2, p0, Lcom/inmobi/androidsdk/bootstrapper/ConfigParams;->e:Ljava/lang/String;

    invoke-virtual {v0, v1, v2}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    .line 142
    iget-object v1, p0, Lcom/inmobi/androidsdk/bootstrapper/ConfigParams;->h:Lcom/inmobi/commons/uid/UID;

    invoke-virtual {v1}, Lcom/inmobi/commons/uid/UID;->toJSON()Lorg/json/JSONObject;

    move-result-object v1

    .line 143
    const-string v2, "ids"

    invoke-virtual {v0, v2, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    .line 145
    iget-object v1, p0, Lcom/inmobi/androidsdk/bootstrapper/ConfigParams;->i:Lcom/inmobi/androidsdk/bootstrapper/AppGalleryConfigParams;

    invoke-virtual {v1}, Lcom/inmobi/androidsdk/bootstrapper/AppGalleryConfigParams;->toJSON()Lorg/json/JSONObject;

    move-result-object v1

    .line 146
    const-string v2, "ag"

    invoke-virtual {v0, v2, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    .line 148
    iget-object v1, p0, Lcom/inmobi/androidsdk/bootstrapper/ConfigParams;->f:Lcom/inmobi/androidsdk/bootstrapper/IMAIConfigParams;

    invoke-virtual {v1}, Lcom/inmobi/androidsdk/bootstrapper/IMAIConfigParams;->toJSON()Lorg/json/JSONObject;

    move-result-object v1

    .line 149
    const-string v2, "imai"

    invoke-virtual {v0, v2, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    .line 151
    iget-object v1, p0, Lcom/inmobi/androidsdk/bootstrapper/ConfigParams;->g:Lcom/inmobi/androidsdk/bootstrapper/MetricConfigParams;

    invoke-virtual {v1}, Lcom/inmobi/androidsdk/bootstrapper/MetricConfigParams;->toJSON()Lorg/json/JSONObject;

    move-result-object v1

    .line 152
    const-string v2, "metric"

    invoke-virtual {v0, v2, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    .line 153
    return-object v0
.end method
